<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<div class="layui-side layui-side-menu">
    <div class="layui-side-scroll">
        <div class="layui-logo" lay-href="${web_domain}/main">
            <span><h3>拖拖部落供应商系统</h3></span>
        </div>

        <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">

            <c:forEach items="${navigation}" var="item">
                <li class="layui-nav-item <c:if test='${item.spread}'>layui-nav-itemed</c:if>">
                    <a href="javascript:void(0);" lay-tips="${item.title}" data-icon="${item.icon}" lay-direction="2">
                        <i class="layui-icon" >${item.icon}</i>
                        <cite>${item.title}</cite>
                    </a>

                    <dl class="layui-nav-child" >
                        <c:forEach items="${item.children}" var="children">
                            <c:choose>
                                <c:when test="${not empty children.children}">
                                    <dd data-name="grid" style="margin-left: 20px;">
                                        <a href="javascript:void(0);" lay-tips="${children.title}" data-icon="${children.icon}" lay-direction="2">
                                            <i class="layui-icon">${children.icon}</i>
                                            <cite>${children.title}</cite>
                                        </a>

                                        <dl class="layui-nav-child" style="margin-left: 20px;">
                                            <c:forEach items="${children.children}" var="childrenItem">
                                                <dd layadmin-event="refresh">

                                                    <a lay-href="${web_domain}/${childrenItem.page.href}" data-icon="${childrenItem.icon}" lay-tips="${childrenItem.title}">
                                                        <i class="layui-icon" >${childrenItem.icon}</i>
                                                        <cite>${childrenItem.title}</cite>
                                                    </a>
                                                </dd>
                                            </c:forEach>
                                        </dl>
                                    </dd>
                                </c:when>
                                <c:otherwise>
                                    <dd layadmin-event="refresh" style="margin-left: 20px;">
                                        <a lay-href="${web_domain}/${children.page.href}" data-icon="${children.icon}" lay-tips="${children.title}">
                                            <i class="layui-icon" >${children.icon}</i>
                                            <cite>${children.title}</cite>
                                        </a>

                                    </dd>
                                </c:otherwise>
                            </c:choose>
                        </c:forEach>
                    </dl>
                </li>

            </c:forEach>

        </ul>
    </div>
</div>